
export class Person {
  private name: string;
  private age: number;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }

  public getPersonInfo(): string {
    return `姓名：${this.name}；年龄：${this.age}`
  }
}

export class Son extends Person {
  private address: string;

  constructor(name: string, age: number, address: string) {
    super(name, age);
    this.address = address;
  }

  getSonInfo(): string {
    return `${super.getPersonInfo()}; 地址：${this.address}`
  }
}